package com.chuangsi.project.admin.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 操作日志
 * </p>
 *
 * @author ocean
 * @since 2020-02-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "TLog对象", description = "操作日志")
public class TLog extends Model<TLog> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty(value = "操作人用户名 关联（sys_user表 nick_name）")
    private String userName;

    @ApiModelProperty(value = "操作模块")
    private String module;

    @ApiModelProperty(value = "操作方法")
    private String methods;

    @ApiModelProperty(value = "操作内容")
    private String content;

    @ApiModelProperty(value = "请求路径")
    private String actionurl;

    @ApiModelProperty(value = "请求IP")
    private String ip;

    @ApiModelProperty(value = "操作状态描述（1:操作成功、2:操作失败）")
    private String commite;

    @ApiModelProperty(value = "返回信息")
    private String msg;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
